# Contributor: Jakub Jirutka <jakub@jirutka.cz>
# Maintainer: Jakub Jirutka <jakub@jirutka.cz>
pkgname=ameba
pkgver=0.13.1
pkgrel=0
pkgdesc="static code analysis tool for Crystal"
url="https://github.com/crystal-ameba/ameba"
arch="x86_64 aarch64"
license="MIT"
makedepends="crystal libxml2-dev shards yaml-dev"
source="$pkgname-$pkgver.tar.gz::https://github.com/veelenga/ameba/archive/v$pkgver.tar.gz"

export CRYSTAL_CACHE_DIR="$srcdir/.cache"

build() {
	make CRFLAGS="--release"
}

check() {
	make test SPEC_FLAGS="--no-color"
}

package() {
	make install PREFIX="$pkgdir/usr"
}

sha512sums="8ad7b75c4fa21d41b623a6e4397dcec8e4b260b4393ac97df477e53f6b0c4d07ac2e7b49e70bed35d45672548b5e88dce045dd4571007163e5dac627bdb10012  ameba-0.13.1.tar.gz"
